import random

# list练习
teachers = ['小张', '小王', '小李', '小赵', '小黑', '小绿', '小兰', '小红']
school = [[], [], []]

# 8个老师 3个办公室

for teacher in teachers:
    let = random.randint(0, 2)
    school[let].append(teacher)

print(school)

# 取范围区间 0:3
print(teachers[:3])
